using MultiAgentsClient.Service.WorkflowEngine.BaseNodes;

namespace MultiAgentsClient.Service.WorkflowEngine;

public class WorkflowConnection
{
    public string Id;
    public string FromNodeId;
    public int FromNodeOutputPortIndex;

    public string ToNodeId;
    public int ToNodeInputPortIndex;

    public WorkflowConnection(string fromNodeId, int fromNodePortIndex, string toNodeId, int toNodePortIndex)
    {
        Id = "";
        FromNodeId = fromNodeId;
        FromNodeOutputPortIndex = fromNodePortIndex;
        ToNodeId = toNodeId;
        ToNodeInputPortIndex = toNodePortIndex;
    }

    public WorkflowConnection(BaseNode fromNode, int fromNodePortIndex, BaseNode toNode, int toNodePortIndex)
    {
        FromNodeId = fromNode.Id;
        FromNodeOutputPortIndex = fromNodePortIndex;
        ToNodeId = toNode.Id;
        ToNodeInputPortIndex = toNodePortIndex;
    }

    public WorkflowConnection()
    {
    }
}
